package org.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * Hello world!
 */
@SpringBootApplication
public class EmptyProject {

    private static ConfigurableApplicationContext context;

    public static void main(String[] args) {
        context = SpringApplication.run(EmptyProject.class, args);
        System.out.println("--------------项目启动了---------------");
        ConfigurableEnvironment environment = context.getEnvironment();
        String port = environment.getProperty("server.port");
//        String contextPath = environment.getProperty("server.servlet.contextPath");
//        System.out.println("contextPath:" + contextPath);
        System.out.println("http://localhost:" + port + "/empty/hello/hi");
    }
}
